import Vue from 'vue'
import App from './App.vue'

// 加载路由配置文件 router/index.js
import router from './router/index.js';

// 加载轮播图模块
import VueAwesomeSwiper from 'vue-awesome-swiper'
import "../node_modules/swiper/css/swiper.min.css"
//将这个swiper全局应用到vue中
Vue.use(VueAwesomeSwiper)

//加载状态管理模块（vuex）
import indexStore from './store/index'

Vue.config.productionTip = false

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

new Vue({
  indexStore,
  router,
  // router: router,
  render: h => h(App),
}).$mount('#app')